home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
376-400
/
disk_376
/
toollibrary
/
src
/
intui1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
4KB
|
86 lines
/********************************************************************/
/**** ****/
/**** ****/
/**** Program : Intui-Funktionen ****/
/**** ****/
/**** Version : 02.06 ****/
/**** ****/
/**** Erstversion : 21.05.1988 ****/
/**** ****/
/**** Letzte Änderung : 03.08.1990 ****/
/**** ****/
/**** Compiliert mit : siehe MAKE ****/
/**** ****/
/**** Gelinkt mit : Für Tool.Library ****/
/**** ****/
/********************************************************************/
/**** ****/
/**** ****/
/**** Copyright by Rüdiger Dreier ****/
/**** ****/
/**** ****/
/********************************************************************/
#include "ToolProto.h"
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
#include <libraries/dos.h>
#include <graphics/gfxmacros.h>
#include <exec/memory.h>
#include <intuition/intuitionbase.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define ACTIVE_SCREEN IntuitionBase->ActiveScreen
#define ACTIVE_WINDOW IntuitionBase->ActiveWindow
#define CODE ((Message!=0) ? Message->Code : 0)
#define CLASS ((Message!=0) ? Message->Class : 0)
#define CircleFill(RP,x,y,r) EllFill(RP,x,y,r,r);
extern struct IntuitionBase *IntuitionBase;
extern struct GfxBase *GfxBase;
VOID __asm Print(register __a1 struct RastPort *RP,
register __a0 char *text,
register __d0 LONG col,
register __d1 LONG xpos,
register __d2 LONG ypos)
{
SetAPen(RP,col);
Move(RP,xpos,ypos);
Text(RP,text,strlen(text));
}
/* Funktion, die die Events abfragt */
/* Parameter : Zeiger auf Fenster und auf Struktur zum Zwischenspeichern */
ULONG __asm EventAbfrage(register __a0 struct Window *Window,
register __a1 struct info *MsgInfo)
{
struct Message *GetMsg();
/* Struktur leeren */
/* MsgInfo->Nachricht=0; */
MsgInfo->NachrichtenArt=0;
/* MsgInfo->code=0; */
/* Wenn Events, dann Struktur entsprechend füllen */
if(MsgInfo->Nachricht=(struct IntuiMessage *)GetMsg(Window->UserPort))
{
MsgInfo->NachrichtenArt=MsgInfo->Nachricht->Class;
MsgInfo->code=MsgInfo->Nachricht->Code;
MsgInfo->IAddress=MsgInfo->Nachricht->IAddress;
MsgInfo->MouseX=MsgInfo->Nachricht->MouseX;
MsgInfo->MouseY=MsgInfo->Nachricht->MouseY;
ReplyMsg((struct Message *)MsgInfo->Nachricht);
}
/* Zusätzlich Class zurückgeben, für while-Schleife */
return(MsgInfo->NachrichtenArt);
}